package com.linked.order.order.bean.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.linked.universal.bean.goods.goods.LinkedGoods;
import lombok.Data;

/**
 * @author :dbq
 * @date : 2023/6/9 9:50
 * @description : desc
 */
@Data
@TableName("order_goods_detail")
public class GoodsDetailPO {
    @TableId(value = "goods_version_id",type = IdType.ASSIGN_UUID)
    private String goodsVersionId;
    @TableField("order_id")
    private String orderId;
    @TableField("version_name")
    private String versionName;
    @TableField("version_price")
    private Double versionPrice;
    @TableField("version_image")
    private String versionImage;
    @TableField("goods_id")
    private String goodsId;
    @TableField("shop_name")
    private String shopName;
    @TableField("shop_id")
    private String shopId;

    public GoodsDetailPO(LinkedGoods goods) {
        this.goodsVersionId = goods.getGoodsVersionId();
        this.versionName = goods.getVersionName();
        this.versionPrice = goods.getVersionPrice();
        this.versionImage = goods.getVersionImage();
        this.goodsId = goods.getGoodsId();
        this.shopName = goods.getShopName();
        this.shopId = goods.getShopId();
    }

    public GoodsDetailPO() {
    }
}
